// PasswordStatical.h: interface for the CPasswordStatical class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PASSWORDSTATICAL_H__AA4AFB3A_6893_46C1_988E_3D92C001619F__INCLUDED_)
#define AFX_PASSWORDSTATICAL_H__AA4AFB3A_6893_46C1_988E_3D92C001619F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "PasswordV.h"

class CPasswordStatical
	: public CPasswordV
{
// Interface
public:
	bool SetStaticPassword(const UINT& nPasswordID, const char* const pszPassword);
	virtual const char* const GetStaticPassword() const;
	virtual void Remove();
	virtual const EAuthResult Authenticate(const char* const pszPassword);

// Construction/Destruction
public:
	CPasswordStatical(const UINT& nPasswordID);
	virtual ~CPasswordStatical();

// Data
private:
	CString m_strPassword;
	
// Implement
protected:
	virtual void OnNew(CADORecordset* pRS);
	virtual inline void Load();
	virtual void MakeInValid();
private:
	static const CString KPasswordStatical;
	static const CString Password;
	inline bool ChangeID(const UINT& nPasswordID);
	inline bool ChangePassword(const char* const pszPassword);
};

#endif // !defined(AFX_PASSWORDSTATICAL_H__AA4AFB3A_6893_46C1_988E_3D92C001619F__INCLUDED_)
